package com.muyu.danmo.mapper;

import java.util.List;
import com.muyu.danmo.domain.DanmoMountFavorite;
import org.apache.ibatis.annotations.Param;

/**
 * 装裱收藏Mapper接口
 * 
 * @author kunzong
 * @date 2024-12-05
 */
public interface DanmoMountFavoriteMapper 
{
    /**
     * 查询装裱收藏
     * 
     * @param id 装裱收藏主键
     * @return 装裱收藏
     */
    public DanmoMountFavorite selectDanmoMountFavoriteById(Long id);

    /**
     * 查询装裱收藏列表
     * 
     * @param danmoMountFavorite 装裱收藏
     * @return 装裱收藏集合
     */
    public List<DanmoMountFavorite> selectDanmoMountFavoriteList(DanmoMountFavorite danmoMountFavorite);

    /**
     * 新增装裱收藏
     * 
     * @param danmoMountFavorite 装裱收藏
     * @return 结果
     */
    public int insertDanmoMountFavorite(DanmoMountFavorite danmoMountFavorite);

    /**
     * 修改装裱收藏
     * 
     * @param danmoMountFavorite 装裱收藏
     * @return 结果
     */
    public int updateDanmoMountFavorite(DanmoMountFavorite danmoMountFavorite);

    /**
     * 删除装裱收藏
     * 
     * @param id 装裱收藏主键
     * @return 结果
     */
    public int deleteDanmoMountFavoriteById(Long id);

    /**
     * 批量删除装裱收藏
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDanmoMountFavoriteByIds(@Param("ids") Long[] ids, @Param("userId") Long userId);

    /**
     * 判断用户是否收藏
     * @param userId
     * @param id
     * @return
     */
    boolean existsByUserIdAndPrintingClassId(@Param("userId") Long userId, @Param("id") Long id);


    /**
     * 判断用户是否点赞
     * @param userId
     * @param id
     * @return
     */
    boolean existsByUserIdAndPrintingClassIdLike(@Param("userId") Long userId, @Param("id") Long id);
}
